div{
    width: 50px;
    height: 50px;
    border: 1px solid;
    float: left;
    background-color: cornflowerblue;
}
div:nth-child(even)>:nth-child(odd),div:nth-child(odd)>:nth-child(even){
    background-color: darkorange;
}